/* *************************************** */
/* * Set Utilities Library               * */
/* * Authors:                            * */
/* *  André Bannwart Perina      7152757 * */
/* *  Rodrigo de Freitas Pereira 7573472 * */
/* *  Thaís Emanuele dos Santos  6453087 * */
/* *************************************** */

#ifndef SET_H
#define SET_H

/* Return constants */
#define SET_CONTAINS 1
#define SET_DOESNT_CONTAINS 0
#define SET_SUCCESS 0
#define SET_OUT_OF_BOUNDS -2

/* Struct of a Set */
typedef struct {
	int size;
	char *set;
} set_t;

/* Create a Set */
void set_create(set_t **, unsigned int);

/* Insert i on a Set. If the element already exists, nothing happens */
int set_insert(set_t **, unsigned int);

/* Return true if Set contains element i */
int set_contains(set_t *, unsigned int);

/* Remove i from the Set, if any */
int set_remove(set_t **, unsigned int);

/* Return the cardinality of the Set */
int set_cardinality(set_t *);

/* Destroy Set */
void set_destroy(set_t **);

#endif